.class public abstract Lde/dealdoktor/app/activities/SuperDetails;
.super Landroid/support/v4/app/FragmentActivity;
.source "SuperDetails.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lde/dealdoktor/app/activities/SuperDetails$DealPagerAdapter;,
        Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;
    }
.end annotation


# static fields
.field protected static final COMMENT_INCREMENT:I = 0xa


# instance fields
.field protected asyncImageLoader:Lde/dealdoktor/app/util/AsyncImageLoader;

.field protected commentsButton:Landroid/widget/Button;

.field protected cssStyle:Ljava/lang/String;

.field protected currentPost:Lde/dealdoktor/app/data/PostDAO;

.field protected currentPostIndex:I

.field public editor:Landroid/content/SharedPreferences$Editor;

.field protected infl:Landroid/view/LayoutInflater;

.field protected productImageView:Landroid/widget/ImageView;

.field public settings:Landroid/content/SharedPreferences;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 31
    invoke-direct {p0}, Landroid/support/v4/app/FragmentActivity;-><init>()V

    return-void
.end method

.method private hideSoftkeys()V
    .locals 3

    .prologue
    .line 123
    const-string v1, "input_method"

    invoke-virtual {p0, v1}, Lde/dealdoktor/app/activities/SuperDetails;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/inputmethod/InputMethodManager;

    .line 124
    .local v0, imm:Landroid/view/inputmethod/InputMethodManager;
    const v1, 0x7f0b0030

    invoke-virtual {p0, v1}, Lde/dealdoktor/app/activities/SuperDetails;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->getWindowToken()Landroid/os/IBinder;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/inputmethod/InputMethodManager;->hideSoftInputFromWindow(Landroid/os/IBinder;I)Z

    .line 125
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/SuperDetails;->getWindow()Landroid/view/Window;

    move-result-object v1

    const/4 v2, 0x3

    invoke-virtual {v1, v2}, Landroid/view/Window;->setSoftInputMode(I)V

    .line 126
    return-void
.end method

.method private initCommentForm()V
    .locals 5

    .prologue
    .line 94
    const v2, 0x7f0b0030

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/SuperDetails;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/EditText;

    const-string v3, ""

    invoke-virtual {v2, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 95
    const v2, 0x7f0b0032

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/SuperDetails;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    .line 96
    .local v0, email:Landroid/widget/EditText;
    iget-object v2, p0, Lde/dealdoktor/app/activities/SuperDetails;->settings:Landroid/content/SharedPreferences;

    const-string v3, "usermail"

    const-string v4, ""

    invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 97
    new-instance v2, Lde/dealdoktor/app/activities/SuperDetails$1;

    invoke-direct {v2, p0}, Lde/dealdoktor/app/activities/SuperDetails$1;-><init>(Lde/dealdoktor/app/activities/SuperDetails;)V

    invoke-virtual {v0, v2}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V

    .line 108
    const v2, 0x7f0b0031

    invoke-virtual {p0, v2}, Lde/dealdoktor/app/activities/SuperDetails;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    .line 109
    .local v1, name:Landroid/widget/EditText;
    iget-object v2, p0, Lde/dealdoktor/app/activities/SuperDetails;->settings:Landroid/content/SharedPreferences;

    const-string v3, "username"

    const-string v4, ""

    invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 110
    new-instance v2, Lde/dealdoktor/app/activities/SuperDetails$2;

    invoke-direct {v2, p0}, Lde/dealdoktor/app/activities/SuperDetails$2;-><init>(Lde/dealdoktor/app/activities/SuperDetails;)V

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V

    .line 120
    return-void
.end method


# virtual methods
.method public onClickSendComment(Landroid/view/View;)V
    .locals 2
    .parameter "v"

    .prologue
    .line 80
    new-instance v0, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;

    invoke-direct {v0, p0}, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;-><init>(Lde/dealdoktor/app/activities/SuperDetails;)V

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/String;

    invoke-virtual {v0, v1}, Lde/dealdoktor/app/activities/SuperDetails$ProgressTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 82
    invoke-direct {p0}, Lde/dealdoktor/app/activities/SuperDetails;->hideSoftkeys()V

    .line 83
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;Lde/dealdoktor/app/data/PostDAO;)V
    .locals 2
    .parameter "savedInstanceState"
    .parameter "currentPost"

    .prologue
    .line 48
    invoke-super {p0, p1}, Landroid/support/v4/app/FragmentActivity;->onCreate(Landroid/os/Bundle;)V

    .line 49
    const v0, 0x7f030003

    invoke-virtual {p0, v0}, Lde/dealdoktor/app/activities/SuperDetails;->setContentView(I)V

    .line 51
    iput-object p2, p0, Lde/dealdoktor/app/activities/SuperDetails;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    .line 53
    new-instance v0, Lde/dealdoktor/app/util/AsyncImageLoader;

    invoke-direct {v0}, Lde/dealdoktor/app/util/AsyncImageLoader;-><init>()V

    iput-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->asyncImageLoader:Lde/dealdoktor/app/util/AsyncImageLoader;

    .line 55
    const-string v0, "layout_inflater"

    invoke-virtual {p0, v0}, Lde/dealdoktor/app/activities/SuperDetails;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    iput-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->infl:Landroid/view/LayoutInflater;

    .line 57
    const-string v0, "dealdoktor_preferences"

    const/4 v1, 0x0

    invoke-virtual {p0, v0, v1}, Lde/dealdoktor/app/activities/SuperDetails;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    iput-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->settings:Landroid/content/SharedPreferences;

    .line 58
    iget-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->settings:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    iput-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->editor:Landroid/content/SharedPreferences$Editor;

    .line 60
    const-string v0, ".update { background: url(\"http://www.dealdoktor.de/wp-content/themes/inove/img/update.gif\") no-repeat scroll 3px 3px #FFF7F7;    border-color: #F5A9A9;    border-style: dashed;    border-width: 4px 0 0 4px;    margin: 5px 0;    padding: 8px 12px 8px 36px;}"

    iput-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->cssStyle:Ljava/lang/String;

    .line 61
    iget-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->cssStyle:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v0, "img{max-width:100%; height:auto; !important;"

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->cssStyle:Ljava/lang/String;

    .line 64
    iget-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->cssStyle:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v0, "table img{max-width:60% !important; height:auto !important;} th, td { border:1px dashed Gold; text-align:left; vertical-align:center;} tr.even td {    background:#F7F7F7;} th {    background:#EDEFF0;}"

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lde/dealdoktor/app/activities/SuperDetails;->cssStyle:Ljava/lang/String;

    .line 66
    invoke-direct {p0}, Lde/dealdoktor/app/activities/SuperDetails;->initCommentForm()V

    .line 67
    return-void
.end method

.method protected onResume()V
    .locals 0

    .prologue
    .line 75
    invoke-super {p0}, Landroid/support/v4/app/FragmentActivity;->onResume()V

    .line 76
    return-void
.end method

.method public onSearchRequested()Z
    .locals 1

    .prologue
    .line 175
    invoke-virtual {p0}, Lde/dealdoktor/app/activities/SuperDetails;->getParent()Landroid/app/Activity;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/Activity;->getParent()Landroid/app/Activity;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/Activity;->onSearchRequested()Z

    move-result v0

    return v0
.end method

.method protected setCurrentPost(Lde/dealdoktor/app/data/PostDAO;)V
    .locals 0
    .parameter "currentPost"

    .prologue
    .line 70
    iput-object p1, p0, Lde/dealdoktor/app/activities/SuperDetails;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    .line 71
    return-void
.end method
